import request from '@/utils/request'
import {
  getToken
} from '@/utils/auth'

export function getList(params) {
  return request({
    url: '/xiandu/admin/v1/list_member',
    method: 'get',
    params: { ...params,
      token: getToken('token')
    }
  })
}
export function getShopList(params) {
  return request({
    url: '/xiandu/admin/v1/list_shop',
    method: 'get',
    params: { ...params,
      token: getToken('token')
    }
  })
}

export function createMember(data) {
  return request({
    url: '/xiandu/admin/v1/create_member',
    method: 'post',
    data
  })
}

export function editMember(data) {
  return request({
    url: '/xiandu/admin/v1/edit_member',
    method: 'post',
    data
  })
}

export function delMember(data) {
  return request({
    url: '/xiandu/admin/v1/del_member',
    method: 'post',
    data
  })
}